feat(subscription): support standalone Xray profiles - #739
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (13)
WalkthroughChangesStandalone Xray templates are now supported across backend CRUD operations, dashboard forms, cached subscription loading, and Xray profile rendering. They require valid JSON with non-empty Standalone Xray profiles
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Warning |
|
what is the use for this? |
This is useful for publishing client-side-only Xray configurations through the subscription system without requiring a PasarGuard node or host. For example, an administrator can add a standalone Fragment, DNS, routing, FakeDNS, noise, or censorship-bypass profile. It will appear as a separate selectable configuration in supported Xray clients. The main use case is when the configuration performs its logic locally on the user's device and therefore does not need a generated proxy outbound or server address. It does not replace normal PasarGuard proxy profiles and does not provide IP changing or traffic accounting by itself. It only allows complete custom Xray JSON profiles to be distributed and updated through the existing subscription URL. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Adds standalone/client-only Xray profiles to subscription output without requiring a PasarGuard host, node, or server address.
xray_standaloneclient template type.{USERNAME}inside nested profile values.Closes #623
Type of change
Checklist
Testing
uv run pytest -q tests/test_subscription_xray_standalone.py— 2 passed.tsc --noEmit.No database migration is required. The existing
client_templates.template_typecolumn is string-backed and already supports additional template type values.Screenshots
Not available in the current validation environment. The UI change adds
Standalone Xray Profileas a new client-template type and provides an editable default JSON example.Notes for reviewers
Every
xray_standalonetemplate is appended only to Xray subscription output. It is not associated with a host and does not receive a generated proxy outbound.Standalone profiles are intentionally not marked as default or system templates because all standalone profiles are published independently and administrators must be able to delete the last one.
A standalone profile can provide local censorship-bypass behavior, but it does not change the user's public IP or provide server-side traffic accounting unless its custom JSON explicitly routes through a remote outbound.
Summary by CodeRabbit
New Features
Improvements